/**
* 功能描述：时间选择器样式表
* @author jin xiaohang
* @date 2022/9/28 14:24
* @version 1.0
*/

@import "src/style/mixins/index";



//定义整个容器布局
@mixin time-picker-layout{
    height: 100%;
    width: 100%;
    max-height: 229px;
    max-width: 168px;
    position: relative;
    left: -2px;
    font-size: 14px;
    text-align: left;
    list-style: none;

  //输入框容器布局
  .#{$namespace}-time-picker-input-wrap{
    position: relative;
    padding: 7px 2px 7px 12px;

    //输入框布局
    .#{$namespace}-time-picker-input{
      width: 100%;
      max-width: 154px;
      margin: 0;
      padding: 0;
      line-height: normal;
    }
  }

  //时间选择面板布局
  .#{$namespace}-time-picker-panel{

    //面板选择项
    .#{$namespace}-time-picker-panel-select{
        position: relative;
        float: left;
        width: 56px;
        max-height: 192px;

        >ul{
          width: 56px;
          margin: 0;
          padding: 0 0 160px;
        }

        li{
          width: 100%;
          height: 32px;
          margin: 0;
          padding: 0 0 0 12px;
          line-height: 32px;
          text-align: left;
          list-style: none;
        }

    }

  }
}

//样式
@include b(time-picker){
  background-color: #fff;
  background-clip: padding-box;
  border-radius: 2px;
  outline: none;
  box-shadow: 0 2px 8px #00000026;

  //引用布局
  @include time-picker-layout;

  //输入框容器样式
  .#{$namespace}-time-picker-input-wrap{
    border-bottom: 1px solid #f0f0f0;

    //输入框样式
    .#{$namespace}-time-picker-input{
      background: #fff;
      border: 0;
      outline: 0;
      cursor: auto;
    }
  }

  //时间选择面板样式
  .#{$namespace}-time-picker-panel{

    //面板选择项
    .#{$namespace}-time-picker-panel-select{
      overflow: hidden;
      font-size: 14px;
      border-left: 1px solid #f0f0f0;

      //ul样式
      >ul{
        list-style: none;
      }

      //列表项样式
      li{
        cursor: pointer;
        transition: all .3s;
        user-select: none;
      }
    }

    //激活面板列样式
    .#{$namespace}-time-picker-panel-select-active{
      &:hover{
        cursor: pointer;
        overflow-y: auto;
        li{
          &:hover{
            background-color: #F5F5F5;
          }
        }
      }
    }

    //选中时间样式
    .#{$namespace}-time-picker-panel-select-date{
      color: #409EFF;
      background-color: #F5F5F5;
    }
  }
}